Skip to content

Improves CI performance - #22995

Draft
NickSdot wants to merge 8 commits into
php:masterfrom
NickSdot:perf/ci-build-times
Draft

Improves CI performance#22995
NickSdot wants to merge 8 commits into
php:masterfrom
NickSdot:perf/ci-build-times

Conversation

@NickSdot

@NickSdot NickSdot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

tl/dr: ~45m -> ~22m; this is CI-only stuff -- everything in #22917 reduces further.

Results

f47a44e (perf: speed up Windows CI)

Windows x64 Before After Improvement
Setup + build 10:53 3:22 69%
Tests 30:37 14:48 52%
Full job 41:55 18:48 55%

Cache hit rate: ~95%.

8e526f1 (perf: speed up benchmark checkout)

Avoids downloading unnecessary file contents. From ~1:11 to ~0:20, which is a 72% improvement.

653fa83 (perf: keep non-Windows compiler caches fresh)

Before: the older the weekly cache, the lower the hit rate. 2026-07-27 was ~99% (0:30s) while 2026-08-02 was only ~25% (6:52). Rolling cache solves that.

Compile job Before (1) After Improvement
Linux release 7:54 0:28 94%
Benchmark 2:33 0:17 89%
Unit tests 2:06 0:14 89%
Linux ASAN 1:50 0:27 75%
macOS 4:07 1:30 64%
Alpine ASAN 2:37 0:57 64%
Linux x32 2:10 0:57 56%

Cache hit rate: ~99%.
(1) when cache not fresh.

6c933cb (perf: skip unused ASAN setup)

Setup Before After Improvement
Service containers 1:24 0:13 85%
MSSQL setup 0:14 Skipped 100%
Apt dependencies 0:54 0:42 22%
Total targeted setup 2:32 0:55 64%

Saves 1:37 per ASAN run. Depending on download speeds shaves off 1–3 min.

a33ae4c (perf: run Function JIT tests concurrently)

Splits from sequentially to separate jobs for normal (16:37m) and JIT (18:47 ); results in 11 minutes earlier finish.

3dcc018 (perf: shard long running jobs)

Critical path dropped from 44:27 to 22:49 (49%). Slowest shards finished in 19:03 for Linux ASAN, 17:39 for Windows x64 ZTS, and 14:43 for Alpine ASAN.

58c43d5 (perf: aded circle ci compile caching)

CircleCI Before Warm cache Improvement
Compile 8:17 3:23 59%

Cache hit rate: ~99%

Warm cache compile down from ~8:17 to ~3:23, which is 59% improvement. Works slightly different than the other caching. Circle isolates caches that belong to external forks. Trusted master builds roll the source repository cache forward; same-repository PRs can restore it, fork PRs start cold and then roll their own forward.

@NickSdot
NickSdot force-pushed the perf/ci-build-times branch 2 times, most recently from c4f48b7 to 6ce446c Compare August 2, 2026 09:16
@NickSdot
NickSdot force-pushed the perf/ci-build-times branch 2 times, most recently from 87c7e25 to 541ac21 Compare August 2, 2026 10:01
@NickSdot
NickSdot force-pushed the perf/ci-build-times branch 10 times, most recently from 4010558 to b9e37cf Compare August 2, 2026 17:09
@NickSdot
NickSdot force-pushed the perf/ci-build-times branch 3 times, most recently from 5f23b04 to 70b3bec Compare August 2, 2026 19:41
Comment thread .github/matrix.php Outdated
@NickSdot
NickSdot force-pushed the perf/ci-build-times branch from 70b3bec to 9de2a2e Compare August 2, 2026 21:18
@NickSdot NickSdot changed the title Improves CI build performance Improves CI performance Aug 3, 2026
@NickSdot
NickSdot force-pushed the perf/ci-build-times branch from 6a1ba96 to 2fb2a6e Compare August 3, 2026 09:17
@NickSdot
NickSdot force-pushed the perf/ci-build-times branch from 2fb2a6e to 09834c1 Compare August 3, 2026 09:32
@NickSdot
NickSdot force-pushed the perf/ci-build-times branch 3 times, most recently from 6ac7397 to ae7dcec Compare August 3, 2026 15:06
@NickSdot
NickSdot force-pushed the perf/ci-build-times branch from ae7dcec to 1c8ede1 Compare August 3, 2026 15:42
@NickSdot

NickSdot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@arnaud-lb maybe it is worth prioritising this one before the others. Would give me a much faster feedback loop for all the rest that likely will receive some more pushes if there is feedback from you to address. Will you look at this one too or should I mark as ready to ping the reviewers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants